use bevy::prelude::*;
fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
    commands.spawn(Camera2dBundle::default());
    commands.spawn(TextBundle {
        background_color: Color::RED.into(),
        text: Text::from_section(
            "ces xia 中文",
            TextStyle {
                font_size: 40.0,
                font: asset_server.load("JetBrainsMono-Medium.ttf"),
                ..default()
            },
        ),
        ..default()
    });
    /* commands.spawn(TextBundle {
        background_color: Color::RED.into(),
        text: Text::from_section(
            "ces xia",
            TextStyle {
                font_size: 40.0,
                font: asset_server.load("prstartk.ttf"),
                ..default()
            },
        ),
        transform: Transform::from_rotation(Quat::from_rotation_z(PI / 6.0)),
        ..default()
    });
    commands.spawn(TextBundle {
        background_color: Color::RED.into(),
        text: Text::from_section(
            "ces xia",
            TextStyle {
                font_size: 40.0,
                font: asset_server.load("prstartk.ttf"),
                ..default()
            },
        ),
        transform: Transform::from_rotation(Quat::from_rotation_z(PI / 3.0)),
        ..default()
    });
    commands.spawn(TextBundle {
        background_color: Color::RED.into(),
        text: Text::from_section(
            "ces xia \u{4e02}",
            TextStyle {
                font_size: 40.0,
                font: asset_server.load("prstartk.ttf"),
                ..default()
            },
        ),
        transform: Transform::from_rotation(Quat::from_rotation_z(PI / 2.0)),
        ..default()
    }); */
}
